package com.fansl.allround.study.designpattern.decorator;

/**
 * @author fansl
 * @Description: 装饰者测试
 * @date 2019/10/11 11:01
 */
public class DecoratorTest {
    public static void main(String[] args) {
        Humburger humburger = new ChickenBurger();
        System.out.println(humburger.getName()+" 价格："+humburger.getPrice());
        Lettuce lettuce = new Lettuce(humburger);
        System.out.println(lettuce.getName()+" 价格："+lettuce.getPrice());
        Chilli chilli = new Chilli(humburger);
        System.out.println(chilli.getName()+" 价格："+chilli.getPrice());
        Chilli chilli2 = new Chilli(lettuce);
        System.out.println(chilli2.getName()+" 价格："+chilli2.getPrice());
    }
}
